package com.example.provider.service.impl;

import com.example.common.entity.Bidding;
import com.example.common.entity.Demand;
import com.example.provider.dao.MessageCenterDao;
import com.example.provider.dao.WorkroomDao;
import com.example.provider.service.MessageCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageCenterServiceImpl implements MessageCenterService {
    @Autowired
    private MessageCenterDao messageCenterDao;
    @Autowired
    private WorkroomDao workroomDao;

    /**
     * 根据前端发来的组号找到对应的竞标关系，并按工作室评分和资金需求降序输出
     * @param bidding
     * @return
     */
    public List<Bidding> getBidding(Bidding bidding) {
        return messageCenterDao.searchBidding(bidding);
    }

    /**
     * 根据需求id获取需求的具体信息
     * @param demand
     * @return
     */
    public Demand getDemand(Demand demand) {
        return messageCenterDao.searchDemand(demand);
    }

}
